<%--
  Created by IntelliJ IDEA.
  User: ch-hui
  Date: 15/12/24
  Time: 下午9:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/common/taglibs.jsp" %>
<html>
<head>
  <title>饲料营养配方</title>
</head>
<body>

<div class="row">
  <div class="col-lg-12">
    <div class="ibox float-e-margins">
      <div class="ibox-title">
        <h5>饲料营养配方 <small>清单</small></h5>
        <div class="ibox-tools">
          <a class="collapse-link">
            <i class="fa fa-chevron-up"></i>
          </a>
          <a class="close-link">
            <i class="fa fa-times"></i>
          </a>
        </div>
      </div>

      <div class="ibox-content">

        <div class="ibox-tools">
          <button class="btn btn-primary" type="button"><i class="fa fa-plus"></i>&nbsp;新增营养配方</button>
        </div>

        <table class="table table-striped table-bordered table-hover dataTables-example">
          <thead>
          <tr>
            <th>配方名称</th>
            <th>饲养阶段</th>
            <th>使用对象</th>
            <th>状态</th>
            <th>来源</th>
          </tr>
          </thead>

          <tbody>
          <c:forEach items="${recipe_needs}" var="needs">
            <tr>
              <td><a href="${BASE}/recipe/needs/edit/${needs.id}">${needs.name}</a></td>
              <td>${needs.stage}</td>
              <td>${needs.useObject}</td>
              <c:if test="${needs.status == 0}">
                <td class="text-warning">${needs.status_value}</td>
              </c:if>
              <c:if test="${needs.status == 1}">
                <td class="text-navy">${needs.status_value}</td>
              </c:if>
              <td>${needs.recipeSource}</td>
            </tr>
          </c:forEach>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript" src="${BASE}/www/script/recipe/recipe_needs.js"></script>
</body>
</html>
